#pragma once


//STD
#include <iostream>
#include <vector>

using namespace std;

//zepyher
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/storage/disk_access.h>
#include <zephyr/logging/log.h>
#include <zephyr/fs/fs.h>
//串口
#include <zephyr/drivers/uart.h>
#define AY_CONFIG_FILE "/SD:/CONFIG.TXT"
#define TEST_FILE "/SD:/TEST.TXT"


typedef struct {
    string record_name = "defalut";
    uint8_t dev_mode = 0;  //模式
    uint8_t dev_count = 0; //设备离线计数

    uint8_t dev_battery = 0; //电量
    uint8_t dev_runtime = 0;  //运行状态
    
    string current_file_name = "/SD:/0.csv"; //电量
    int err_code = 0; //错误代码
}device_info_t;

device_info_t dev;
//因为变量名和其他重名所以这里改成函数来设置
extern void set_errcode(int num);


